package com.i2863.receipt.entity;

import com.i2863.receipt.util.BaseEntity;
import lombok.Data;

import javax.persistence.*;
import java.util.Date;

/**
 * 报名表（发票表）实体
 * Created by Administrator on 2018/6/7.
 */
@Entity
@Table(name = "d_receipt")
@Data
public class Receipt extends BaseEntity{

    /**
     * 发票代码
     */
    @Column(name="code",nullable = false)
    private String code;

    /**
     * 发票号码
     */
    @Column(name = "code_num",nullable = false)
    private String codeNum;

    /**
     * 发票金额
     */
    @Column(name = "money",nullable = false)
    private Double money;

    /**
     * 发票开具时间
     */
    @Column(name = "receipt_date",nullable = false)
    private Date receiptDate;

    /**
     * 报名者联系电话
     */
    @Column(name = "phonenum",nullable = false)
    private String phoneNum;

    /**
     * 所属活动
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name="activity_id")
    private Activity activity;

    /**
     * 开票商户名称
     */
    @Column(name = "business_name",nullable = false)
    private String businessName;

}
